7. Examples

The following are examples of URLs used to retrieve Freebusy data for a user:

EXAMPLE 1

http://www.example.com/freebusy/user1@example.com?start=2007-09-01T00:00:00-08:00&end=2007-09-31T00:00:00-08:00

http://www.example.com/freebusy/user1@example.com?start=2007-09-01T00:00:00-08:00&end=2007-09-31T00:00:00-08:00&format=text/calendar

http://www.example.com/calendar/user1@example.com?start=2007-09-01T00:00:00-08:00&end=2007-09-31T00:00:00-08:00&format=text/javascript

http://www.example.com/freebusy/user1@example.com

http://www.example.com/freebusy?user=user1@example.com&token=xcsfdgetdh&start=2008-01-01T00:00:00Z&end=2008-12-31T00:00:00Z

http://www.example.com/freebusy?user=user%201@example.com&start=2008-01-01T00:00:00Z&end=2008-12-31T00:00:00Z

The following are examples of URLs used to retrieve Freebusy data for a user where the userid has been obfuscated:

EXAMPLE 2

http://www.example.com/freebusy/cbGf65Rfh?start=2007-09-01T00:00:00-08:00&end=2007-09-31T00:00:00-08:00&format=text/calendar

http://www.example.com/calendar/freebusy/cbGf65Rfh

Some Request/Response Examples:

EXAMPLE 3 — An URL with no query parameters

>> Request <<

GET /freebusy/bernard/ HTTP/1.1
Host: www.example.com

>> Response <<

HTTP/1.1 200 OK
Content-Type: text/calendar; charset="utf-8"
Content-Length: xxxx

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Example Corp.//CalDAV Client//EN
BEGIN:VFREEBUSY
ORGANIZER;CN="Bernard
Desruisseaux":mailto:bernard@example.com
UID:76ef34-54a3d2@example.com
DTSTAMP:20050530T123421Z
DTSTART:20060101T000000Z
DTEND:20060108T000000Z
FREEBUSY:20050531T230000Z/20050601T010000Z
FREEBUSY;FBTYPE=BUSYTENTATIVE:
20060102T100000Z/20060102T120000Z
FREEBUSY:20060103T100000Z/20060103T120000Z
FREEBUSY:20060104T100000Z/20060104T120000Z
FREEBUSY;FBTYPE=BUSYUNAVAILABLE:
20060105T100000Z/20060105T120000Z
FREEBUSY:20060106T100000Z/20060106T120000Z
END:VFREEBUSY
END:VCALENDAR
EXAMPLE 4 — An URL with start and end parameters

>> Request <<

GET /freebusy/user1@example.com?start=2007-09-
01T00:00:00-08:00&end=2007-09-31T00:00:00-08:00
HTTP/1.1
Host: www.example.com

>> Response <<

HTTP/1.1 200 OK
Content-Type: text/calendar; charset="utf-8"
Content-Length: xxxx

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Example Corp.//CalDAV Client//EN
BEGIN:VFREEBUSY
ORGANIZER:
UID:76ef34-54a3d3@example.com
DTSTAMP:20070905T100000Z
DTSTART:20070901T080000Z
DTEND:20070931T080000Z
FREEBUSY:20070903T230000Z/20070904T010000Z
FREEBUSY;FBTYPE=BUSYTENTATIVE:
20070906T100000Z/20070906T120000Z
FREEBUSY:20070908T100000Z/20070908T120000Z
FREEBUSY:20070909T100000Z/20070909T120000Z
FREEBUSY;FBTYPE=BUSYUNAVAILABLE:
20070915T100000Z/20070917T120000Z
FREEBUSY:20070920T100000Z/20070922T120000Z
END:VFREEBUSY
END:VCALENDAR
EXAMPLE 5 — An URL for which the server does not have any data for that user

>> Request <<

GET /freebusy/user1@example.com?start=2012-12-
01T00:00:00-08:00&end=2012-12-31T00:00:00-08:00
HTTP/1.1
Host: www.example.com

>> Response <<

HTTP/1.1 404 No Data